import {request} from '@/utils/request'

/**
 * 获取用户 OpenID
 * @param code - 微信登录凭证
 */
export async function getOpenId(code: string) {
  return request({
    url: '/wechat/openid',
    method: 'POST',
    needAuth: true,
    data: {
      code
    }
  })
}
